package com.nbpt.edu.commercesites.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import pojo.Good;

import java.util.List;
import java.util.Map;

@Repository
public interface GoodMapper extends BaseMapper<Good> {
    Good selectGoodById(Long id);
    Page<Good> selectGoodPage(IPage<Good> page,@Param("g_name") String gName,@Param("g_category_id") Long gCatgoryId,@Param("g_hot") Boolean gHot);
    List<Good> selectGoods(Good good);
    Page<Good> selectPageGoods(Good good);
    //page MyBatis-plus所提供的分页对象,必须位于第一个参数的位置
    Page<Good> selectPageVo(@Param("page") Page<Good> page , @Param("g_name") String gName);

    void insertMappingByMap(@Param("map") Map<String, Object> mapping);

}
